<template>
  <div class="app-container">
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">
          测试
        </div>
      </div>
      <div class="cont-bottom" style="background: #282c34;">

      </div>
    </el-card>

     <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">
          DataV-轮播表<el-button @click="doUpdate" type="success" size="mini"
            >替换数据滚动列表是否更新数据测试</el-button
          >
        </div>
      </div>
      <div class="cont-bottom">
        <DatavTable ref="DatavTable" />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">DataV-轮播排名</div>
      </div>
      <div class="cont-bottom" style="background: #282c34;">
        <DatavRanking />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">语音套餐</div>
      </div>
      <div class="cont-bottom">
        <PieVoice />
      </div>
    </el-card>

    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">设备故障率</div>
      </div>
      <div class="cont-bottom">
        <PieFailurerate />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">设备类型</div>
      </div>
      <div class="cont-bottom PieDevicetype">
        <PieDevicetype />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">设备在线离线统计</div>
      </div>
      <div class="cont-bottom">
        <BarDevicenet />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">在线离线趋势图</div>
      </div>
      <div class="cont-bottom">
        <LineStatistics />
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="cont-top">
        <div class="con-title">回款率</div>
      </div>
      <div class="cont-bottom">
        <BarRate />
      </div>
    </el-card> 
  </div>
</template>

<script>
// 语音套餐
import PieVoice from './components/PieVoice.vue'
// 设备故障率
import PieFailurerate from './components/PieFailurerate.vue'
// 设备类型
import PieDevicetype from './components/PieDevicetype.vue'
// 设备在线离线统计
import BarDevicenet from './components/BarDevicenet.vue'
// 设备在线离线趋势图
import LineStatistics from './components/LineStatistics.vue'
// 回款率
import BarRate from './components/BarRate.vue'
// datav-轮播表
import DatavTable from './components/DatavTable.vue'
// datav-轮播排名
import DatavRanking from './components/DatavRanking.vue'
export default {
  name: 'Purejs',
  components: {
    PieVoice,
    PieFailurerate,
    PieDevicetype,
    BarDevicenet,
    LineStatistics,
    BarRate,
    DatavTable,
    DatavRanking
  },
  methods: {
    // datav-轮播表添加数据
    doUpdate () {
      this.$refs.DatavTable.ceshi()
    }
  }
}
</script>

<style lang="scss" scoped>
.app-container {
  // background-color: #ccc;
  height: auto;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  // 适配谷歌火狐，没有书签栏的上下边距
  @media screen and (min-height: 950px) and (max-height: 990px) {
    margin-top: 15px;
    // margin-bottom: 50px;
  }
  // 适配浏览器全屏模式下的上下边距
  @media screen and (min-height: 1070px) {
    margin-top: 60px;
    margin-bottom: 100px;
  }

  ::v-deep .box-card {
    width: 32%;
    height: 328px;
    margin: 0 2% 1% 0;
    &:nth-child(3n) {
      margin-right: 0;
    }

    .el-card__body {
      height: 100%;
      padding: 0;
      display: flex;
      flex-direction: column;
      // align-items: center;
      .cont-top {
        height: 50px;
        .con-title {
          line-height: 50px;
          padding-left: 10px;
          font-size: 16px;
          // font-family: PingFang SC-Bold, PingFang SC;
          font-weight: 700;
          border-bottom: 1px solid #f4f4f4;
        }
      }
      .cont-bottom {
        flex: 1;
        padding: 10px;
        // background: skyblue;
      }
      .PieDevicetype {
        background: rgba(2, 29, 159, 0.7);
      }
    }
    // box-shadow: 0px 0px 6px 0px rgba(51, 59, 72, 0.04);
    // border-radius: 8px;
    // background: #fff;
  }
}
</style>
